-- elixir_bonus
-- create by zhuangsl
-- 道具：

return {
    apply = function(source, target, classId, value)
        -- 命运の钥
        local level = 1;

        --托塔天王专属加强效果
        local prop = PropM.combine(source, "gain_slime_skill", 41);
        level = PropM.apply(prop, level);

        -- 奖励
        for i = 1, level do
            local arr = value[i];

            if arr[2] == "random_attrib" then
                -- 随机属性
                local bonusList = { {2, "attack", 1, }, {2, "magic", 1, },
                                    {2, "max_hp", 10,}, {2, "max_mp", 10,}};
                arr = bonusList[1 + DungeonM.getRandSeed("property_elixir_bonus") % #bonusList];
            end

            -- 属性奖励
            BonusM.doBonus(arr, "apply_property");
        end
    end,
};
